﻿using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace MuHelper.Tests
{
    [TestClass]
    public class MeasureIsNone
    {
        [TestMethod]
        public void IsNone_On_Measure_None()
        {
            Assert.IsTrue(Measure.None.IsNone());
        }

        [TestMethod]
        public void IsNone_On_Base_Measure()
        {
            var measure = new Measure("m");
            Assert.IsFalse(measure.IsNone());
        }

        [TestMethod]
        public void IsNone_On_ComplexMeasure()
        {
            var measure = new Measure("m2", 1, new Dictionary<string, decimal> {{"m", 2}});
            Assert.IsFalse(measure.IsNone());

            measure = new Measure("kk", 1000000, new Dictionary<string, decimal>());
            Assert.IsFalse(measure.IsNone());

            measure = new Measure("none", 1, new Dictionary<string, decimal>{ {"None", 2}, {"m", 0} });
            Assert.IsTrue(measure.IsNone());
        }
    }
}
